<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H5GG Memory Editor</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 10px;
        }
        h1 {
            text-align: center;
            color: #333;
            font-size: 1.2em;
            margin-bottom: 15px;
        }
        .container {
            max-width: 350px;
            margin: 0 auto;
            background: #fff;
            padding: 10px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .action {
            margin-bottom: 10px;
        }
        .buttons {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .buttons button {
            padding: 12px;
            background-color: #007BFF;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.2s;
            font-size: 1em;
        }
        .buttons button:hover {
            background-color: #0056b3;
        }
        .buttons button:active {
            transform: scale(0.98);
        }
        .toast {
            visibility: hidden;
            min-width: 250px;
            margin-left: -125px;
            background-color: #333;
            color: #fff;
            text-align: center;
            border-radius: 2px;
            padding: 16px;
            position: fixed;
            z-index: 1;
            left: 50%;
            bottom: 30px;
            font-size: 17px;
        }
        .toast.show {
            visibility: visible;
            -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
            animation: fadein 0.5s, fadeout 0.5s 2.5s;
        }
        @-webkit-keyframes fadein {
            from {bottom: 0; opacity: 0;} 
            to {bottom: 30px; opacity: 1;}
        }
        @keyframes fadein {
            from {bottom: 0; opacity: 0;}
            to {bottom: 30px; opacity: 1;}
        }
        @-webkit-keyframes fadeout {
            from {bottom: 30px; opacity: 1;} 
            to {bottom: 0; opacity: 0;}
        }
        @keyframes fadeout {
            from {bottom: 30px; opacity: 1;}
            to {bottom: 0; opacity: 0;}
        }
    </style>
</head>
<body>
    <h1>H5GG Memory Editor</h1>
    <div class="container">
        <!-- Action 1 -->
        <div class="action">
            <div class="buttons">
                <button onclick="action1()">闪避</button>
            </div>
        </div>

        <!-- Action 2 -->
        <div class="action">
            <div class="buttons">
                <button onclick="action2()">广告攻击</button>
            </div>
        </div>

        <!-- Action 3 -->
        <div class="action">
            <div class="buttons">
                <button onclick="action3()">技能伤害</button>
            </div>
        </div>
    </div>

    <div id="toast" class="toast">成功</div>

    <script>
        function showToast(message) {
            var toast = document.getElementById("toast");
            toast.textContent = message;
            toast.className = "toast show";
            setTimeout(function() {
                toast.className = toast.className.replace("show", "");
            }, 3000);
        }

        function action1() {
            h5gg.clearResults();
            h5gg.searchNumber('0.0082', 'F64', '0x0', '0x160000000');
            h5gg.editAll("1", 'F64');
            h5gg.clearResults();
            showToast('闪避修改成功');
        }

        function action2() {
            h5gg.clearResults();
            h5gg.searchNumber('0.3', 'F64', '0x00000000', '0x200000000');
            h5gg.searchNearby('0.08', 'F64', '0x100');
            h5gg.editAll('10.9991', 'F64');
            h5gg.clearResults();
            showToast('广告攻击修改成功');
        }

        function action3() {
            h5gg.clearResults();
            h5gg.searchNumber('2.8023', 'F64', '0x0', '0x160000000');
            h5gg.editAll("50.9991", 'F64');
            h5gg.clearResults();
            showToast('技能伤害修改成功');
        }
    </script>
</body>
</html>
